package park.manage;

import javax.xml.crypto.Data;
import java.util.Date;
import java.util.zip.CRC32;

public class Car implements Comparable{
    String name;
    String carNumber;
    Date entryTime ;
    public Car(String name, String carNumber,Date entryTime) {
        this.name = name;
        this.carNumber = carNumber;
        this.entryTime = entryTime;
    }
    public Car(String name, String carNumber) {
        this.name = name;
        this.carNumber = carNumber;
        this.entryTime = new Date();
    }
    public int compareTo(Object o) {
        Car car = (Car)o;
        return this.carNumber.compareTo(car.carNumber);
    }
    public String toString(){
        return name+","+carNumber+","+entryTime;
    }
}
